<?php
/* @var $this PictureController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Pictures',
);

//foreach($model as $value) $projId = $value->Project_id;
$this->menu=array(
	array('label'=>'Add more pictures', 'url'=>array('picture/create2','id'=>$projId)),
	array('label'=>'Go back to project', 'url'=>array('project/view','id'=>$projId)),
);
?>

<h1>Pictures</h1>

<?php /*$this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); */
if($model==null) echo 'Project has no pictures';
else{
	foreach($model as $value)
	{
		echo '<img src="' . Yii::app()->request->baseUrl .'/images/uploaded/'. $value->url . '" height="100" width="160">';
		echo '<br>';
		echo CHtml::link('Delete',array('picture/delete2','id'=>$value->id, 'projId'=>$projId));
		echo '<br>';
	}
}
?>
